package org.lmind.scale.study

object Closure {

  def fn1(a: Int): Int => Int = {
    def fn2(b: Int) = {
      a + b
    }
    return fn2
  }

  def fn2(a: Int) =
    (b: Int) => a + b

  def main(args: Array[String]) {
      
      var a = fn1(1)(2)
      var b = fn2(3)(4)
      println(a + b)
  }

}